<?php
/**
 * Created by PhpStorm.
 * User: 图图
 * Date: 2021-1-5
 * Time: 9:11
 */
namespace app\manage\validate;

use think\Validate;

/**
 * 行为验证器
 * @package app\menus\validate
 * @author
 */
class Seckill extends Validate
{
    //定义验证规则
    protected $rule = [
        'goods_id|相关产品'  => 'require|unique:qt_seckill_goods',
        'count|秒杀数量'  => 'require',
        'title|活动名称'  => 'require',
        'status|状态'  => 'require',
        'sort|排序'  => 'require',
        'is_ship|包邮'=>'require',
        'start_time|开始时间'=>'require',
        'end_time|结束时间'=>'require',
    ];
        //定义验证场景
    protected $scene = [
        'add'   =>  ['goods_id','count','title','status','sort','is_ship','start_time','end_time'],
        'update'  =>  ['count','title','status','sort','is_ship','start_time','end_time'],
    ];
}